﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Com.CMS263.PO;
using Com.CMS263.DAO;

namespace Com.CMS263.BLL
{
    public class CommentBLL : BaseBLL<Comment>
    {
        public Comment entity = new Comment();
        CommentDAO dao = new CommentDAO();
        public override Comment GetModel()
        {
            return entity;
        }
        /// <summary>
        /// 根据发布信息用户和状态查询任务信息
        /// </summary>
        /// <param name="page"></param>
        /// <param name="pagesize"></param>
        /// <param name="userid"></param>
        /// <param name="state"></param>
        /// <returns></returns>
        public IList<Comment> GetListPaging(int page, int pagesize, int userid, string state,bool isDel)
        {
            return dao.GetListPaging(page, pagesize, userid, state, isDel);
        }
        /// <summary>
        /// 根据发布信息用户和状态查询任务信息条目数
        /// </summary>
        /// <param name="userid"></param>
        /// <param name="state"></param>
        /// <returns></returns>
        public int GetListPaging(int userid, string state, bool isDel)
        {
            return dao.GetListPaging(userid, state, isDel);
        }
        /// <summary>
        /// 根据处理意见用户和状态查询任务信息
        /// </summary>
        /// <param name="page"></param>
        /// <param name="pagesize"></param>
        /// <param name="worker"></param>
        /// <param name="state"></param>
        /// <returns></returns>
        public IList<Comment> GetListPagingByWorker(int page, int pagesize, int worker, string state)
        {
            return dao.GetListPagingByWorker(page,pagesize,worker,state);
        }
        /// <summary>
        /// 根据处理意见用户和状态查询任务信息条目数
        /// </summary>
        /// <param name="worker"></param>
        /// <param name="state"></param>
        /// <returns></returns>
        public int GetListPagingByWorker(int worker, string state)
        {
            return dao.GetListPagingByWorker(worker, state);
        }



        /// <summary>
        /// 查询待完成日程
        /// </summary>
        /// <param name="userid"></param>
        /// <param name="isPub"></param>
        /// <param name="isDel"></param>
        /// <param name="page"></param>
        /// <param name="pagesize"></param>
        /// <returns></returns>
        public IList<Comment> GetListPagings(int state, int userid, bool isPub, bool isDel, int page, int pagesize)
        {
            return dao.GetListPagings(state, userid, isPub, isDel, page, pagesize);
        }


        /// <summary>
        /// 查询待完成日程数量
        /// </summary>
        /// <param name="userid"></param>
        /// <param name="isPub"></param>
        /// <param name="isDel"></param>
        /// <param name="page"></param>
        /// <param name="pagesize"></param>
        /// <returns></returns>
        public int GetListPagings(int state, int userid, bool isPub, bool isDel)
        {
            return dao.GetListPagings(state, userid, isPub, isDel);
        }


        /// <summary>
        /// 查询已删除日程
        /// </summary>
        /// <param name="userid"></param>
        /// <param name="isPub"></param>
        /// <param name="isDel"></param>
        /// <param name="page"></param>
        /// <param name="pagesize"></param>
        /// <returns></returns>
        public IList<Comment> GetListPagings( int userid,  bool isDel, int page, int pagesize)
        {
            return dao.GetListPagings(userid,  isDel, page, pagesize);
        }


        /// <summary>
        /// 查询已删除日程数量
        /// </summary>
        /// <param name="userid"></param>
        /// <param name="isPub"></param>
        /// <param name="isDel"></param>
        /// <param name="page"></param>
        /// <param name="pagesize"></param>
        /// <returns></returns>
        public int GetListPagings( int userid,  bool isDel)
        {
            return dao.GetListPagings( userid,  isDel);
        }

        /// <summary>
        /// 批量修改暂存
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        public Boolean BatchCommentUpdate(string ids)
        {
            return dao.BatchCommentUpdate(ids);
        }

        /// <summary>
        /// 批量修改删除
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>

        public Boolean BatchCommentDelete(string ids)
        {
            return dao.BatchCommentDelete(ids);
        }

         /// <summary>
        /// 批量取消删除
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        public Boolean BatchCCommentUpdate(string ids)
        {
            return dao.BatchCCommentUpdate(ids);
        }

        /// <summary>
        /// 批量删除
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        public Boolean BatchCCommentDelete(string ids)
        {
            return dao.BatchCCommentDelete(ids);
        }
    }
}
